<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/11 0011
 * Time: 19:59
 */

namespace App\Models\Admin;


class DepositOut extends Common
{
    #让利存款解冻表
    protected $table = 'deposit_out';

    /**
     * 获取列表
     *
     * @param $node_id
     * @return mixed
     */
    public function getLists($node_id)
    {
        return $this->where('node_id', $node_id)
            ->orderBy('id', 'desc')
            ->paginate(20);
    }


    /**
     * 获得解冻金额
     *
     * @param $node_id
     * @return int
     */
    public function getUnfreeze($node_id)
    {
        return $this->where('node_id', $node_id)
            ->sum('unfreeze_balance');
    }

}